Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag Go memstats during writes to _internal #4165

Merged
merged 1 commit into from
Sep 18, 2015
Merged

Conversation

otoolep
Copy link
Contributor

@otoolep otoolep commented Sep 18, 2015

The Go runtime stats were not being tagged when written to the _internal database, where meant there was no way to get stats for just a single node -- data for all nodes was returned in aggregate, if the system was being run as a cluster. This change fixes that.

Before the change:

> show tag keys
name: runtime
-------------
tagKey

After the change:

> show tag keys
name: runtime
-------------
tagKey
clusterID
hostname
nodeID

@otoolep otoolep self-assigned this Sep 18, 2015
@otoolep otoolep added this to the 0.9.5 milestone Sep 18, 2015
@otoolep
Copy link
Contributor Author

otoolep commented Sep 18, 2015

@corylanou @dgnorton

@@ -241,6 +241,12 @@ func (m *Monitor) Statistics(tags map[string]string) ([]*statistic, error) {
Tags: make(map[string]string),
Values: make(map[string]interface{}),
}

// Add any supplied tags to Go memstats
for k, v := range tags {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See line 162 to see where the "supplied tags" come from.

@dgnorton
Copy link
Contributor

+1

otoolep added a commit that referenced this pull request Sep 18, 2015
Tag Go memstats during writes to _internal
@otoolep otoolep merged commit f8678e6 into master Sep 18, 2015
@otoolep otoolep deleted the runtime_not_tagged branch September 18, 2015 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants